using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Galaktika.BI.Extensibility.Dom
{
    using Galaktika.BI.Extensibility.Dom.Workstation;

    [XmlRoot(Namespace = Galaktika.BI.Silverlight.Common.Namespace)]
    public class BrickContainer : BrickObject
    {
        public BrickContainer()
        {
        }

        public BrickContainer(string name)
            : this(name, name)
        {
        }

        public BrickContainer(string name, string title)
            : base(name, title)
        {
        }

        private List<BrickObject> m_Children;
        [XmlArray]
        [XmlArrayItem(typeof(BrickWorkstationItem))]
        [XmlArrayItem(typeof(BrickFolder))]
        //[XmlArrayItem(typeof(BrickVariable))]
        public List<BrickObject> Children
        {
            get
            {
                if (m_Children == null)
                {
                    m_Children = new List<BrickObject>();
                }

                return m_Children;
            }
        }
    }
}
